﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModulesList.aspx.cs" Inherits="Saker.Web.Boss.Sys.Modules.ModulesList" %>

<%@ Register Src="../../../Controls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../../../Styles/global.css?v=1.0" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/jquery.utils.js" type="text/javascript"></script>
    <script src="../../../Scripts/admin.js?v=1.0" type="text/javascript"></script>
    <script src="../../../Scripts/admin.ui.js?v=1.0" type="text/javascript"></script>
    <script type="text/javascript">
        admin.config.indexUrl = '/Boss/Main.aspx';
        var loading_img = "../../../images/loading_16x16.gif";

        // 只调用最顶的jBox
        if (top.jBox != undefined) {
            window.jBox = top.jBox;
        }

        top.orderChanged = false;
        function checkReload() {
            if (top.orderChanged) {
                top.orderChanged = false;
                goUrl(location.href);
            }
        }

        function checkAll(chk, id) {
            if (id == undefined)
                $("input[type='checkbox']").each(function () { this.checked = chk.checked; });
            else {
                $("#" + id + " input[type='checkbox']").each(function () { this.checked = chk.checked; });
            }
        }

        function goUrl(url) {
            top.admin.ui.goUrl(url);
            // 可能在jBox里点击跳转，同时关闭它
            jBox.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="block-wp">
        <div class="block-sep">
        </div>
        <div class="block">
            <div class="h">
                <span class="icon-sprite icon-list"></span>
                <h3>
                    模块列表</h3>
                <div class="bar">
                    <a class="btn-lit" href="javascript:goUrl('Sys/Modules/ModuleAdd.aspx?cmd=Add');"><span>
                        新增一级模块</span></a>
                </div>
            </div>
            <div class="tl corner">
            </div>
            <div class="tr corner">
            </div>
            <div class="bl corner">
            </div>
            <div class="br corner">
            </div>
            <div class="cnt-wp">
                <div class="cnt">
                    <table class="data-table" width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                            <tr>
                                <th scope="col">
                                    模块名称
                                </th>
                                <th scope="col">
                                    模块URL
                                </th>
                                <th scope="col">
                                    模块权限
                                </th>
                                <th scope="col">
                                    编辑
                                </th>
                                <th scope="col">
                                    添加子模块
                                </th>
                                <th scope="col">
                                    删除
                                </th>
                            </tr>
                            <asp:Repeater ID="RepModulesList" runat="server" OnItemCommand="RepModulesList_ItemCommand"
                                OnItemDataBound="RepModulesList_ItemDataBound">
                                <ItemTemplate>
                                    <tr>
                                        <td class="txt80 c">
                                            <asp:Label ID="lab_ID" runat="server" Text='<%# Eval("ModuleID")%>' Style="display: none"></asp:Label>
                                            <%#Eval("ModuleName")%>
                                        </td>
                                        <td class="txt160 c">
                                            <%#Eval("ModuleURL")%>
                                        </td>
                                        <td class="txt200 c">
                                            <asp:CheckBoxList ID="cbAuthority" Enabled="false" runat="server" RepeatLayout="Flow">
                                            </asp:CheckBoxList>
                                        </td>
                                        <td class="icon">
                                            <asp:LinkButton CssClass="opt" ID="lbtnEdit" CommandArgument='<%#Eval("ModuleID")%>'
                                                CommandName="EditModules" runat="server"><span class="icon-sprite icon-edit"></span> </asp:LinkButton>
                                        </td>
                                        <td class="icon">
                                            <asp:LinkButton CssClass="opt" ID="lbtnAdd" CommandArgument='<%#Eval("ModuleID")%>'
                                                CommandName="AddChild" runat="server"><span class="icon-sprite icon-edit"></span> </asp:LinkButton>
                                        </td>
                                        <td class="icon tail">
                                            <asp:LinkButton CssClass="opt" ID="lbtnDel" CommandArgument='<%#Eval("ModuleID")%>'
                                                CommandName="DeleteModules" runat="server" OnClientClick="JavaScript:return confirm('你确定要删除该用户吗？');"><span class="icon-sprite icon-delete"></span></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!--#wp-->
    </form>
</body>
</html>
